import { MyVue } from 'src/wl/my_vue';
import Vue from 'vue';
import { Component, Emit, Prop, Provide, Watch } from 'vue-property-decorator'
import { auditManageConst } from "src/consts/audit_manage_const";
import { PopupName } from "src/consts/popup_const";
import * as Api from 'src/api/net';

@Component({})
export default class MemberAddPanel extends MyVue {
    name: string = 'MemberAddPanel';
    formData: any;
    footerFlag: boolean = true;

    initData(that?: any): void {
        that.formData = {};
    }

    doAudit(): void {
        if (this.formData.status) {
            var list = WLStore().state.auditManage.selectList
            for (let i = 0; i < list.length; i++) {
                var sendData: any = {}
                sendData.entity_id = list[i].entity_id
                sendData.status = this.formData.status
                sendData.model = list[i].model
                sendData.remark = this.formData.remark
                if (i == list.length - 1) {
                    sendData.isLast = true
                }
                WLDispatch(auditManageConst.DispatchAuditMAudit, sendData)
            }
        } else {
            WLMessage("请选择审核意见", "warning")
        }
    }

}